<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<style>
    .a{
        border: red solid 5px;
    }
</style>
<body>

<div id="app">
    <img :src="srcUrl" width="200" :title="title" :class="flag?'a':''">
    <hr>
    <!--v-show通过style中disable来控制标签的显示和隐藏   v-if:通过删除和创建标签来控制-->
    <button @click="run">点击</button>
</div>

<script>
    let app = new Vue({
        el:"#app",
        data:{
            srcUrl:"img/6.jpg",
            title:"忍者神龟",
            age:18,
            flag:true
        },
        methods:{
            run(){
                this.srcUrl="img/9.jpg",
                this.title="终极猎手",
                this.flag=false
            }
        }
    })
</script>
</body>
</html>